﻿using System;
using System.Collections.Generic;
using IDAL;
using Model;

namespace BLL
{
    public class Interim
    {
        private static readonly IInterim dal = DALFactory.DataAccess.CreateInterim();

        public IList<TestInfo> GetDebugTestsbyProductSN(string productSN)
        {
            if (string.IsNullOrEmpty(productSN))            
                return null;            
            return dal.GetDebugTestsbyProductSN(productSN);            
        }

        public IList<TestInfo> GetDebugTestsbyPackageProductSN(string packageProductSN)
        {
            if (string.IsNullOrEmpty(packageProductSN))
                return null;
            return dal.GetDebugTestsbyPackageProductSN(packageProductSN);
        }

        public IList<TestInfo> GetDebugTestsbyDT(DateTime starttime, DateTime stoptime)
        {
            return dal.GetDebugTestsbyDT(starttime, stoptime);
        }

        public IList<TestInfo> GetDebugTestsbyUIDDT(string userID, DateTime starttime, DateTime stoptime)
        {
            return dal.GetDebugTestsbyUIDDT(userID, starttime, stoptime);
        }

        public int GetQbyUIDDT(string userID, DateTime starttime, DateTime stoptime)
        {
            return dal.GetQbyUIDDT(userID, starttime, stoptime);
        }

        //------------------------------------------------------------------------------------------------------------------
        public IList<Time_PRInfo> GetDebug_PRbyUID_DT(DateTime starttime, DateTime stoptime)
        {
            return dal.GetDebug_PRbyUID_DT(starttime, stoptime);
        }

        public IList<Time_PRInfo> GetDebug_PRbyEID_DT(DateTime starttime, DateTime stoptime)
        {
            return dal.GetDebug_PRbyEID_DT(starttime, stoptime);
        }
    }
}
